var app = getApp(),
  $ = require("../../utils/httpHelper.js")
Page({
  data: {
    indexArray: [],
    userInfo: {},
    showdialog: false
  },
  onLoad: function (e) {
    var that = this;
    this.setData({ 'userInfo': app.globalData.userInfo })
    $.httpPost("get_banner", "", (data, err) => {
    })

  },
  togz() {
    wx.navigateTo({
      url: '/pages/jifen/gz?info=' + 'member'
    })
  },
  showDialog() {
    this.setData({
      showdialog: true
    })
  },
  formSubmit: function (e) {
    var rd_session = wx.getStorageSync('rd_session');
    var param = { rd_session: rd_session, name: e.detail.value.username, phone: e.detail.value.userphone }
    $.httpPost("apply_share", param, (data, err) => {
      wx.showToast({
        title: data.message,
        duration: 2000
      })
      this.setData({
        showdialog: false
      })
    })
    console.log('form发生了submit事件，携带数据为：', e.detail.value)
  },
  formReset: function () {
    this.setData({
      showdialog: false
    })
    console.log('form发生了reset事件')
  },
  tomember() {
    wx.navigateTo({
      url: '/pages/mine/sqmember'
    })
  }

});